﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Configuration;
using System.Data;
using System.Data.Objects;
using System.Data.SqlServerCe;
using System.Xml.Linq;
using WinBudget.Properties;

namespace WinBudget
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();           
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            XElement AccountList = XElement.Load("Accounts.xml");
            accountSummaryDG.DataContext = AccountList;
        }        
               
        private void Options_Click(object sender, RoutedEventArgs e)
        {
            Options o = new Options();
            o.Show();
        }

        private void headerButton_Click(object sender, RoutedEventArgs e)
        {
            Headers h = new Headers();
            h.Show();
        }

        private void categoriesButton_Click(object sender, RoutedEventArgs e)
        {
            Categories c = new Categories();
        }

        private void accountSummaryDG_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
        {

        }       

        private void Add_Edit_Click(object sender, RoutedEventArgs e)
        {
            Headers h = new Headers();
            h.Show();
        }

        private void About_Click(object sender, RoutedEventArgs e)
        {
            About ab = new About();
            ab.Show();
        }

        private void Account_Click(object sender, RoutedEventArgs e)
        {
            Account ac = new Account();
            ac.Show();
        }

        private void ExpenseCategory_Click(object sender, RoutedEventArgs e)
        {
            Expense_Category ec = new Expense_Category();
            ec.Show();
        }

        private void Exit_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }        
    }
}
